import request from '@/utils/request'
/*.then(res => {
    // 返回数据
})
    .catch(err => {
        // 异常情况
    })*/

// •	获取消息数据接口

// 登录接口
export default {

  /**
   * 七、搜索通讯录功能
   * @param data
   * 请求参数:{"fleetId":67,"numOrName":"l"}
   返回参数: type 0终端 1调度员
   */
  getFleetSubAndUser(data) {
    return request({
      // ContentType: 'application/x-www-form-urlencoded',
      // ContentType: 'application/json',
      url: '/scs/subscriberManage/getFleetSubAndUser',
      method: 'post',
      data
    });
  },
  /**
   * 获取对应调度员的角色
   * @param data
   * 入参 userId
   */
  getUserRole(data) {
    return request({
      url: '/scs/roleManage/getUserRole',
      method: 'post',
      data
    });
  },
  /**
   * 获取终端类型id
   * @param data
   * 入参 userId
   */
  queryAllSubType(data) {
    return request({
      url: '/scs/subscriberManage/getAllSubType ',
      method: 'post',
      data
    });
  },
  /**
   * 写日志
   * @param data
   * 入参 userId
   * audit/addAudit
   audit/queryAudit
   */
  addAudit(data) {
    return request({
      url: '/scs/audit/addAudit',
      method: 'post',
      data
    });
  },
  updatePassword (data) {
    return request({
      ContentType: 'application/json',
      url: '/scs/userManage/updatePassword',
      method: 'post',
      data
    })
  }, getFleetUser (data) {
    return request({
      ContentType: 'application/json',
      url: '/scs/userManage/getFleetUser',
      method: 'post',
      data
    })
  }, queryBook (data) {
    return request({
      ContentType: 'application/json',
      url: '/scs/addressBookController/queryBook',
      method: 'post',
      data
    })
  },
}
